import { ref, watch } from "vue"

export const currentItem: any = ref(null)

watch(
  () => currentItem.value,
  (val, old) => {
    if (old?.active) old.active = false
    val.active = true
  }
)